N = 1024;
f0=213.3/N;
n=0:N-1;
x=5.8*cos(2*pi*f0*n);
w=window(@hamming,N);
y=x.*w';

figure(1); hold off;
plot(n,y,'.');

figure(2); hold off;
NN=16*1024;
X=fft(x,NN);
Y=fft(y,NN);
k=0:NN-1;
plot(k/NN,db(abs(Y)));
